package com.youngwang.system.date;

import com.yuntu.common.utils.DateUtils;
import com.yuntu.common.utils.StringUtils;

import java.io.IOException;
import java.util.Date;

/**
 * @author youngwang
 *         Date: 2016/9/1
 */
public class DateFormatUtils {

    public static void main(String[] args) throws IOException {
        Date date = new Date();
        Date _date = DateUtils.addDays(date, 1);
        String[] dateFormats = {DateUtils.format(date, "yyyy-MM-dd HH:mm:ss.SSS"), DateUtils.format(_date, "yyyy-MM-dd HH:mm:ss.SSS")};
        for (String dateFormat : dateFormats) {
            if (StringUtils.isNotBlank(dateFormat)) {
                System.out.println(dateFormat);
            }
        }
    }
}
